import datetime

import mongoengine as db
from app.db import BaseDocument


class UrlBlackList(BaseDocument):
    meta = {
        'collection': 'url_blacklist',
    }

    url = db.StringField(default='')
    create_time = db.DateTimeField(default='')
    add_type = db.StringField(default='系统', choices=['系统', '自定义'])
    job_id = db.ObjectIdField(default=None)
    task_id = db.ObjectIdField(default=None)
    uid = db.ObjectIdField(default=None)
    detail = db.StringField(default='')
    task_type = db.StringField(default='')
    setting_id = db.ObjectIdField()
